﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using WP8.Binding.Classes;

namespace WP8.Binding.Pages
{
    public partial class DataContext : PhoneApplicationPage
    {
        public DataContext()
        {
            InitializeComponent();
        }
       
        private void btnBig_Click(object sender, RoutedEventArgs e)
        {
            MyEntity entity = new MyEntity { ColorID = 1, Descripcion = "Estoy en el Grid Grande" };
            this.bigGrid.DataContext = entity; 
        }

        private void btnMedium_Click(object sender, RoutedEventArgs e)
        {
            MyEntity entity = new MyEntity { ColorID = 2, Descripcion = "Estoy en el Grid Mediano" };
            this.mediumGrid.DataContext = entity; 
        }

        private void btnSmall_Click(object sender, RoutedEventArgs e)
        {
            MyEntity entity = new MyEntity { ColorID = 3, Descripcion = "Estoy en el Grid Pequeño" };
            this.smallGrid.DataContext = entity; 
        }
    }
}